package homework_07.home_01;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        System.out.println("请输入您想租赁的汽车类型：");
        System.out.println("轿车->1");
        System.out.println("客车->2");
        int x;
        x=in.nextInt();
        if(x==1){
            Car car = new Car();
            System.out.println("请输入要租的品牌：");
            System.out.println("宝马：->1");
            System.out.println("别克：->2");
            x=in.nextInt();
            if (x==1){
                car.setBrand(1);
            }
            else {
                car.setBrand(2);
            }
            System.out.println("请输入要租的日期：");
            car.setDays(in.nextInt());
            car.calculate();
        }
        else {
            Bus bus = new Bus();
            System.out.println("请输入要租的类型：");
            System.out.println("15座以下：->1");
            System.out.println("15座以上：->2");
            x=in.nextInt();
            if (x==1){
                bus.setX(1);
            }
            else bus.setX(2);
            System.out.println("请输入要租的日期：");
            bus.setDays(in.nextInt());
            bus.calculate();
        }


    }
}
